/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author pborrego
 */
@Entity
@Table(name = "DELICIOUS")
@NamedQueries({@NamedQuery(name = "Delicious.findAll", query = "SELECT d FROM Delicious d"), @NamedQuery(name = "Delicious.findByDeliciousid", query = "SELECT d FROM Delicious d WHERE d.deliciousid = :deliciousid"), @NamedQuery(name = "Delicious.findByUsername", query = "SELECT d FROM Delicious d WHERE d.username = :username"), @NamedQuery(name = "Delicious.findByPassword", query = "SELECT d FROM Delicious d WHERE d.password = :password"), @NamedQuery(name = "Delicious.findByTags", query = "SELECT d FROM Delicious d WHERE d.tags = :tags"), @NamedQuery(name = "Delicious.findByOccurrence", query = "SELECT d FROM Delicious d WHERE d.occurrence = :occurrence")})
public class Delicious implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "DELICIOUSID")
    private Integer deliciousid;
    @Column(name = "USERNAME")
    private String username;
    @Column(name = "PASSWORD")
    private String password;
    @Column(name = "TAGS")
    private String tags;
    @Column(name = "OCCURRENCE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date occurrence;

    public Delicious() {
    }

    public Delicious(Integer deliciousid) {
        this.deliciousid = deliciousid;
    }

    public Integer getDeliciousid() {
        return deliciousid;
    }

    public void setDeliciousid(Integer deliciousid) {
        this.deliciousid = deliciousid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public Date getOccurrence() {
        return occurrence;
    }

    public void setOccurrence(Date occurrence) {
        this.occurrence = occurrence;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (deliciousid != null ? deliciousid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Delicious)) {
            return false;
        }
        Delicious other = (Delicious) object;
        if ((this.deliciousid == null && other.deliciousid != null) || (this.deliciousid != null && !this.deliciousid.equals(other.deliciousid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Delicious[deliciousid=" + deliciousid + "]";
    }

}
